package Array.domainC;

import Array.domain.Students;

public class sc {
    public static void main(String[] args){
        Students[] arr=new Students[3];
        Students stu1=new Students("张三",23);
        Students stu2=new Students("李四",24);
        Students stu3=new Students("王五",25);

        arr[0]=stu1;
        arr[1]=stu2;
        arr[2]=stu3;
        for (int i=0;i<arr.length;i++){
            Students s=arr[i];
            System.out.println(s.getName()+"------"+s.getAge());
        }
    }
}
